// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.SQLObjectImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "SQLAlterTableDeleteByCondition.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../SQLExpr.h"

SQLExpr_ptr SQLAlterTableDeleteByCondition::getWhere()
{
  return where;
}

void SQLAlterTableDeleteByCondition::setWhere(SQLExpr_ptr where)
{
  this->where = where;
  if (where != nullptr)
  {
    this->where->setParent(SharedObject(SQLAlterTableDeleteByCondition));
  }
}

// @Override
void SQLAlterTableDeleteByCondition::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLAlterTableDeleteByCondition)))
  {
    acceptChild(visitor, where);
  }
  visitor->endVisit(SharedObject(SQLAlterTableDeleteByCondition));
}
